package com.itheima.z1.service;

/*
import com.itheima.z1.aop.CheckCache;
import com.itheima.z1.aop.EvictCache;
import com.itheima.z1.dao.TeacherDao;
import com.itheima.z1.domain.Teacher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherService {

    @Autowired
    private TeacherDao teacherDao;

    @CheckCache
    public List<Teacher> findAll() {
        return teacherDao.findAll();
    }

    @CheckCache
    public Teacher findById(int id) {
        return teacherDao.findById(id);
    }

    @CheckCache
    public List<Teacher> findByName(String name) {
        return teacherDao.findByName(name);
    }

    public void save(Teacher teacher) {
        teacherDao.save(teacher);
    }

    public void update(Teacher teacher) {
        teacherDao.update(teacher);
    }

    @EvictCache
    public void delete(int id) {
        teacherDao.delete(id);
    }
}
*/
